const state = {
  item: null,
  ticket: null,
  visible: false,
  token: null
}

const mutations = {
  updateItem: (state, payload) => {
    state.item = payload
  },
  updateTicket: (state, payload) => {
    state.ticket = payload
  },
  updateVisible: (state, payload) => {
    state.visible = payload
  },
  updateToken: (state, payload) => {
    state.token = payload
  },
  clearRegister: (state) => {
    state.item = null
    state.ticket = null
    state.visible = false
    state.token = null
  }
}

export default {
  namespaced: true,
  state,
  mutations
}
